<?php


namespace Part23_CommandMode\Code3;

/**
 * 抽象命令
 */
abstract class Command
{
    /**
     * @var Barbecuer
     */
    protected $receiver;

    /**
     * 只需要确定"烤羊肉串者是谁"
     * @param $receiver Barbecuer
     */
    public function __construct($receiver)
    {
        $this->receiver = $receiver;
    }

    /**
     * 执行命令
     */
    abstract function executeCommand();
}